#ifndef CMEALRECIPE_H
#define CMEALRECIPE_H

#include <QObject>
#include "cobject.h"
namespace cooking {

class CMealRecipe : public CObject
{
    Q_OBJECT
    Q_ENUMS(RecipeStatus)
//    Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged)
    Q_PROPERTY(int mealId READ mealId WRITE setMealId NOTIFY mealIdChanged)
    Q_PROPERTY(int recipeId READ recipeId WRITE setRecipeId NOTIFY recipeIdChanged)
    Q_PROPERTY(RecipeStatus status READ status WRITE setStatus NOTIFY statusChanged)
public:
    explicit CMealRecipe(QObject *parent = 0);
    enum RecipeStatus {
        Default,
        Scheduled,
        Cooking,
        Served,
        Canceled
    };
//    int id();
//    void setId(int id);

    int mealId();
    void setMealId(int mealId);

    int recipeId();
    void setRecipeId(int recipeId);

    RecipeStatus status();
    void setStatus(RecipeStatus status);
signals:
//    void idChanged();
    void mealIdChanged();
    void recipeIdChanged();
    void statusChanged();

public slots:
private:
//    int m_id;
    int m_meal_id;
    int m_recipe_id;
    RecipeStatus m_status;
};
} // namespace cooking
#endif // CMEALRECIPE_H
